#ifndef _ABS_FACTORY_H_
#define _ABS_FACTORY_H_

#include <iostream>
#include <memory>

class AText{
public:
public:
    virtual void render()=0;
};

class WinText:public AText{
    void render() override;
};

class MacText:public AText{
    void render() override;
};

/// @brief //////////////////////////////////
class ARadio{
public:
    virtual void check()=0;
};

class WinRadio:public ARadio{
    void check() override;
};

class MacRadio:public ARadio{
    void check() override;
};

//////////////////////////////////////////////
class AbsFactory{
public:
    virtual std::unique_ptr<ARadio> createRadio()=0;
    virtual std::unique_ptr<AText> createText()=0;
};

class WinFactory:public AbsFactory{
    std::unique_ptr<ARadio> createRadio() override;
    std::unique_ptr<AText> createText() override;
};

class MacFactory:public AbsFactory{
    std::unique_ptr<ARadio> createRadio() override;
    std::unique_ptr<AText> createText() override;
};
/////
class App{
public:
    std::unique_ptr<AbsFactory> _factory;
    App(std::unique_ptr<AbsFactory> factory):_factory(std::move(factory)){};
    void show();
};


#endif